package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.vo.PhysicalVo;
import com.mk.admin.service.PhysicalService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/physical")
@Api(tags = "体检套餐")
public class PhysicalController extends BaseController<PhysicalVo> {
    @Autowired
    private PhysicalService physicalService;

    @PostMapping("/select")
    @Override
    public ResultDto select(@RequestBody PhysicalVo physicalVo) {
        return physicalService.select(physicalVo);
    }

    @PostMapping("/add")
    @Override
    public ResultDto add(@RequestBody PhysicalVo physicalVo) {
        return physicalService.add(physicalVo);
    }

    @PostMapping("/yuyue")
    public ResultDto yuyue(@RequestBody PhysicalVo physicalVo) {
        return physicalService.yuyue(physicalVo);
    }

    @PostMapping("/update")
    @Override
    public ResultDto update(@RequestBody PhysicalVo physicalVo) {
        return physicalService.update(physicalVo);
    }

    @PostMapping("/delete")
    @Override
    public ResultDto delete(@RequestBody PhysicalVo physicalVo) {
        return physicalService.delete(physicalVo.getId());
    }

    @PostMapping("/status")
    @Override
    public ResultDto status(@RequestBody PhysicalVo physicalVo) {
        return physicalService.status(physicalVo.getId());
    }
}
